//
//  FindBandView.m
//  project
//
//  Created by 圆圆陈 on 2018/3/5.
//  Copyright © 2018年 黄建华. All rights reserved.
//

#import "FindBandView.h"

@implementation FindBandView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self=[super initWithFrame:frame]) {
        UIView *backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width-FitW(100), FitH(200))];
        backView.center = CGPointMake(frame.size.width/2, frame.size.height/2);
        backView.backgroundColor = SNCOLORWHITE;
        backView.layer.cornerRadius = 10;
        backView.clipsToBounds = YES;
        [self addSubview:backView];
        CGFloat width = backView.width;
        CGFloat height = backView.height;
        
        UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake((width-FitW(60))/2, FitH(10), FitW(60),height/3)];
        [imageView setImage:UIImageNamed(@"手环")];
        [backView addSubview:imageView];
        
        UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, width, height/3)];
        label.center = CGPointMake(width/2, height/2);
        label.text = SN_Text(@"手环震动中......");
        label.textAlignment = NSTextAlignmentCenter;
        label.textColor = UIColorRGB(72, 72, 72);
        [backView addSubview:label];
        
        UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(0, height*2/3, width, height/3)];
        [button setTitleNormal:SN_Text(@"确定")];
        [button setTitleColorNormal:UIColorRGB(0, 0, 0)];
        [button addTouchUpTarget:self action:@selector(btnClick)];
        [backView addSubview:button];
       
    }
    return self;
}
-(void)btnClick{
    [KK_BLESend sendSetFindBle:NO withUpdateBlock:^(id object, KKBLEAcceptType type)
     {
         
     }];
    [self animationedDown];
}
-(void)tapTouch{
    return;
    [KK_BLESend sendSetFindBle:NO withUpdateBlock:^(id object, KKBLEAcceptType type)
     {
         
     }];
    [self animationedDown];
}
@end
